unit uniRelLogOperacao;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, QRCtrls, QuickRpt, ExtCtrls, DB, ADODB, jpeg;

type
  TfrmRelLogOperacao = class(TForm)
    qrpRel: TQuickRep;
    QRBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    qrlPeriodo: TQRLabel;
    qrlDtInicio: TQRLabel;
    QRLabel4: TQRLabel;
    qrlDtFim: TQRLabel;
    lbl1: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel6: TQRLabel;
    qrbDetalhe: TQRBand;
    QRDBText1: TQRDBText;
    QRDBText3: TQRDBText;
    QRBand2: TQRBand;
    QRLabel14: TQRLabel;
    QRSysData2: TQRSysData;
    QRSysData1: TQRSysData;
    qrlUsuario: TQRDBText;
    QR_Rel: TADOQuery;
    DS_Rel: TDataSource;
    QR_RelCD_USUARIO: TIntegerField;
    QR_RelDATA: TDateTimeField;
    QR_RelCD_OPERACAO: TIntegerField;
    QR_RelDESCRICAO: TWideStringField;
    QR_RelUSUARIO: TWideStringField;
    QRDBText2: TQRDBText;
    qrImgCliente: TQRImage;
    procedure qrbDetalheBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure qrpRelBeforePrint(Sender: TCustomQuickRep;
      var PrintReport: Boolean);
  private
    intLinha:integer;
  public
    { Public declarations }
  end;

var
  frmRelLogOperacao: TfrmRelLogOperacao;

implementation

uses uniMenu;

{$R *.dfm}

procedure TfrmRelLogOperacao.qrbDetalheBeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
  var colCorBanda : TColor;
  intContador :integer;
begin
  if ((intLinha mod 2) = 0) then
        colCorBanda := TColor(RGB(255,255,255))
     else
        colCorBanda := TColor(RGB(230,230,230));

     for intContador := 0 to qrbDetalhe.ControlCount - 1 do
     begin
         if qrbDetalhe.Controls[intContador] is TQRLabel then
            (qrbDetalhe.Controls[intContador] as TQRLabel).Color := colCorBanda;
         if qrbDetalhe.Controls[intContador] is TQRDBText then
            (qrbDetalhe.Controls[intContador] as TQRDBText).Color := colCorBanda;

         qrbDetalhe.Color := colCorBanda;
     end;

  inc(intLinha);

end;

procedure TfrmRelLogOperacao.qrpRelBeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);
begin
  intLinha := 1;
end;

end.
